<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
    	if(IS_POST){
    		//邮件发送,测试成功
	 		$name = I('post.name');
	        $address = I('post.address');
	        $phone = I('post.phone');
	        // 拼接字符串方式
			$str='姓名：'.$name.'<br>'.'地址：'.$address.'<br>'.'手机号：'.$phone.'<br>';
			$err = send_email('1104408991@qq.com','邮件标题',$str);
			var_dump($err);
    	}else{
    		$this->display();
    	}
	}
}